package main
import "fmt"

type suanfa func(int,int)int

func main(){
	var rt int
	
	rt = calc(5, 2, sum)
	fmt.Printf("%d\n",rt)
	rt = calc(5, 2, jian)
	fmt.Printf("%d\n",rt)
	rt = calc(5, 2, cheng)
	fmt.Printf("%d\n",rt)
	rt = calc(8, 2, chu)
	fmt.Printf("%d\n",rt)
}
func calc(a int, b int, sf suanfa)int{
	var rt int
	fmt.Printf("Calc：")
	rt = sf(a, b)
	return rt
}

func sum(a, b int)int{
	return a + b
}

func jian(a, b int)int{
	return a - b
}

func cheng(a, b int)int{
	return a * b
}

func chu(a, b int)int{
	return a / b
}
